<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<script>
    $(function(){
        $("#all").attr("checked",'checked');
    })
    function loadDetail(orderId){
        loadDiv('detailInfo','${ctx}/nurse/searchDetailByOrder?orderId='+orderId)
    }
</script>

        <div class="content-wrap">
            <ul class="nav nav-tabs">
                <li><a href="#" onclick="loadDiv('mainCenterDiv','${ctx}/nurse/index')">床位列表</a></li>
                <li class="active">
                    <a href="#">费用核对</a>
                </li>
            </ul>
            <div class="row">
                <section class="panel panel-default">
                    <div class="panel-body">
                        <div class="pull-left">
                            <form class="form-inline" id="orderInfo" onsubmit="return loadDivForm('mainCenterDiv','orderInfo','${ctx}/nurse/checkCosts');" method="post">
                                <input type="hidden" name="visitId" value="${orders.visitId}">
                                <label>住院号：</label><input type="text" name="visitNo" value="${patVisit.visitNo}" class="form-control">
                                <lable>姓名:</lable><input type="text" value="${patVisit.patVisitIndex.name}"  name="name"  class="form-control">
                                <label>性别:</label><input type="text" value="${fns:getDictLabels(patVisit.patVisitIndex.sex,'SEX_DICT','')}" name="sex" class="form-control">
                                <label>入院日期:</label><input type="text" name="admissionDate" value="<fmt:formatDate value="${patVisit.admissionDate}" pattern="yyyy-MM-dd"></fmt:formatDate>" class="form-control">
                                <label>预交金:</label><input type="text" name="prepayments" class="form-control" value="${patVisit.prepayments}">
                                <br>
                                <label>长期/临时:</label><input type="radio" value="01"  id="all"> 全部 &nbsp;<input type="radio" value="1" name="repeatIncaditor">长期&nbsp;<input type="radio" value="0" name="repeatIncaditor">临时
                                <input id="search" class="btn btn-primary" type="submit" value="查询" onclick="printDetials();"/>
                            </form>
                        </div>
                    </div>
                </section>
            </div>
            <div class="row" id="topDivId">

                <div class="col-lg-6">
                    <section class="panel panel-default">
                        <div class="panel-body" style="overflow-x:auto;overflow-y:auto;overflow:auto;">
                          <table id="contentTable" class="table table-bordered mg-t datatable" >
                            <thead>
                              <tr>
                                  <th>长/临</th>
                                  <th>类别</th>
                                  <th>开始时间</th>
                                  <th>医嘱内容</th>
                                  <th>剂量</th>
                                  <th>单位</th>
                                  <th>途径</th>
                                  <th>次数</th>
                                  <th>结束时间</th>
                                  <th>自</th>
                                  <th>校对时间</th>
                              </tr>
                            </thead>
                            <tbody>
                            <c:forEach items="${page.list}" var="orders">
                                <tr onclick="loadDetail('${orders.id}')">
                                    <td >
                                        <c:if test="${orders.repeatIncaditor=='0'}">临时</c:if>
                                        <c:if test="${orders.repeatIncaditor=='1'}">长期</c:if>
                                    </td>
                                    <td>${fns:getDictLabel(orders.orderClass, 'BILL_ITEM_CLASS_DICT', '')}</td>
                                    <td><fmt:formatDate value="${orders.startDate}" pattern="yyyy-MM-dd"/> </td>
                                    <td >${orders.orderText}</td>
                                    <td>${orders.singleDose}</td>
                                    <td>${fns:getDictLabels(orders.singleDoseUnit,'dose_unit','')}</td>
                                    <td>${fns:getSysDictLabel(orders.administration,"ADMINISTRATION_DICT","")}</td>
                                    <td>${orders.performFreq}</td>
                                    <td><fmt:formatDate value="${orders.stopDate}" pattern="yyyy-MM-dd"/></td>
                                    <td>${fns:getDictLabels(orders.billingAttr,'BILLING_ATTR','')}</td>
                                    <td><fmt:formatDate value="${orders.checkDate}" pattern="yyyy-MM-dd"/> </td>
                                </tr>
                            </c:forEach>
                            </tbody>
                           </table>
                            <div class="pagination">${page}</div>
                        </div>
                     </section>
                </div>
                <div class="col-lg-6" id="detailInfo">
                     <jsp:include page="checkCostsDetals.jsp"></jsp:include>
                </div>
            </div>
        </div>
</div>
</div>
